<?php /* Smarty version 2.6.14, created on 2015-04-09 14:33:11
         compiled from platform_game.index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'platform_game.index.html', 13, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<link href="<?php echo @BASEURI; ?>
public/css/jui/jui.css" type="text/css" rel="stylesheet" />
<script language="JavaScript" src="<?php echo @BASEURI; ?>
public/js/placeHolder.js"></script>
<script language="JavaScript" src="<?php echo @BASEURI; ?>
public/js/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>

<form action="<?php echo $this->_tpl_vars['formAction']; ?>
" method="POST" <?php if ($this->_tpl_vars['is_validator']): ?> id="adminform" onsubmit="return Validator.Validate(this)" <?php endif; ?>>
<table border="0" class="search" cellspacing="0" id="search">
   	<tr>
    	<td class="searchlogo">&nbsp;</td>
		<td><?php echo $this->_tpl_vars['systemLang']['chooseGame']; ?>

			<select name="s[platform]" <?php if ($_SESSION['adminmanager']['platform'] != '*'): ?>disabled=true<?php endif; ?>>
                <option value=''><?php echo $this->_tpl_vars['systemLang']['choosePlatform']; ?>
</option>
                <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['platform'],'selected' => $this->_tpl_vars['search']['platform']), $this);?>

            </select>
            <input type="button" class="button" name="ng" onclick="submitform('<?php echo @BASEURI; ?>
platform_game/index',false)" value="<?php echo $this->_tpl_vars['systemLang']['sure']; ?>
" />
        	&nbsp;&nbsp;<a href="/platform_game/index"><?php echo $this->_tpl_vars['systemLang']['clearSearch']; ?>
;</a>
        </td>
    </tr>
</table>

<table width="100%" border="0" class="adminlist" cellspacing="0">
  <thead>
  <tr>
 	<th><input id="toggle" type="checkbox" value=""/></th>
	<th><?php echo $this->_tpl_vars['systemLang']['sort']; ?>
</th>
	<th><?php echo $this->_tpl_vars['systemLang']['gameIsDisplay']; ?>
</th>

    <th><?php echo $this->_tpl_vars['systemLang']['gameNumber']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['gamePlatform']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['gameName']; ?>
</th>
	<th><?php echo $this->_tpl_vars['systemLang']['gameKey']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['lang']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['gameCategory']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['gameScore']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['displayLocation']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['operate']; ?>
</th>
  </tr>
  </thead>
  <tbody>
  <?php $_from = $this->_tpl_vars['games']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['a'] => $this->_tpl_vars['game']):
?>
  <tr class="row0">
   <td><input name="select_id[]" type="checkbox"  class="checkbox" id="cb<?php echo $this->_tpl_vars['a']; ?>
" value="<?php echo $this->_tpl_vars['game']['game_id']; ?>
" /></td>
    <td> <input type="text" size="3" value="<?php echo $this->_tpl_vars['game']['game_order']; ?>
"></td>
	<td><select  id="game_status_<?php echo $this->_tpl_vars['game']['game_id']; ?>
">
	    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['game_status'],'selected' => $this->_tpl_vars['game']['game_status']), $this);?>

    </select></td>
   <td><?php echo $this->_tpl_vars['game']['game_id']; ?>
</td>
   <td><?php echo $this->_tpl_vars['platform'][$this->_tpl_vars['game']['belong_platform']]; ?>
</td>
    <td><?php echo $this->_tpl_vars['game']['name']; ?>
</td>
	<td><?php echo $this->_tpl_vars['game']['game_key']; ?>
</td>
    <td><?php echo $this->_tpl_vars['country_type'][$this->_tpl_vars['game']['country_type']]; ?>
</td>
    <td><?php echo $this->_tpl_vars['game_type'][$this->_tpl_vars['game']['type']]; ?>
</td>
    <td><?php echo $this->_tpl_vars['game']['game_score']; ?>
</td>
    <td><?php echo $this->_tpl_vars['game_address'][$this->_tpl_vars['game']['game_address']]; ?>
</td>
	<td><a href="<?php echo @BASEURI; ?>
platform_game/edit/<?php echo $this->_tpl_vars['game']['game_id']; ?>
"><?php echo $this->_tpl_vars['systemLang']['edit']; ?>
</a>&nbsp;
<a href="<?php echo @BASEURI; ?>
platform_game/delete/<?php echo $this->_tpl_vars['game']['game_id']; ?>
" onclick="return confirm('<?php echo $this->_tpl_vars['systemLang']['delConfirm']; ?>
')"><?php echo $this->_tpl_vars['systemLang']['del']; ?>
</a>
</td>
  </tr>
  <?php endforeach; endif; unset($_from); ?>
  </tbody>
  <tfoot>
      <tr>
        <td><!--
            <input type="button"  class="button" value="<?php echo $this->_tpl_vars['systemLang']['del']; ?>
" onclick="select_control('<?php echo @BASEURI; ?>
platform_game/delete','<?php echo $this->_tpl_vars['systemLang']['delConfirm']; ?>
')"/>
            <input type="button"  class="button" value="<?php echo $this->_tpl_vars['systemLang']['add']; ?>
" onclick="button_location('<?php echo @BASEURI; ?>
platform_game/add')" accesskey="N" />
            -->
        </td>
       <td  colspan="6"><?php echo $this->_tpl_vars['page']; ?>
</td>
      </tr>
  </tfoot>

</table>
</form>


<div id="game_invite_template" title="<?php echo $this->_tpl_vars['systemLang']['gameInviteTextTpl']; ?>
" style=" width:400px; height:400px; display:none;">
    <form action="gameinvitetemplate/save" method="post">
        <input type="hidden" id="lang_fgameid" name="id" />
        <table cellpadding="3" cellspacing="1" border="0" class="zz" style="width:100%;">
            <tr>
                <td width="130">qq<?php echo $this->_tpl_vars['systemLang']['cn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_qq" name="qq" />
                </td>
            </tr>
            <tr>
                <td width="130">qq<?php echo $this->_tpl_vars['systemLang']['en']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_qq_en" name="qq_en" />
                </td>
            </tr>
            <tr>
                <td width="130">qq<?php echo $this->_tpl_vars['systemLang']['jp']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_qq_jp" name="qq_jp" />
                </td>
            </tr>
            <tr>
                <td width="130">qq<?php echo $this->_tpl_vars['systemLang']['kr']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_qq_ko" name="qq_ko" />
                </td>
            </tr>
            <tr>
                <td width="130">qq<?php echo $this->_tpl_vars['systemLang']['twCn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_qq_tw" name="qq_tw" />
                </td>
            </tr>
            <tr>
                <td width="130"><?php echo $this->_tpl_vars['systemLang']['weiboCn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_weibo" name="weibo" />
                </td>
            </tr>
            <tr>
                <td width="130"><?php echo $this->_tpl_vars['systemLang']['weiboEn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_weibo_en" name="weibo_en" />
                </td>
            </tr>
            <tr>
                <td width="130"><?php echo $this->_tpl_vars['systemLang']['weiboJp']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_weibo_jp" name="weibo_jp" />
                </td>
            </tr>
            <tr>
                <td width="130"><?php echo $this->_tpl_vars['systemLang']['weiboKr']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_weibo_ko" name="weibo_ko" />
                </td>
            </tr>
            <tr>
                <td width="130"><?php echo $this->_tpl_vars['systemLang']['weiboTwCn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_weibo_tw" name="weibo_tw" />
                </td>
            </tr>
            <tr>
                <td width="130">twitter<?php echo $this->_tpl_vars['systemLang']['cn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_twitter" name="twitter" />
                </td>
            </tr>
            <tr>
                <td width="130">twitter<?php echo $this->_tpl_vars['systemLang']['en']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_twitter_en" name="twitter_en" />
                </td>
            </tr>
            <tr>
                <td width="130">twitter<?php echo $this->_tpl_vars['systemLang']['jp']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_twitter_jp" name="twitter_jp" />
                </td>
            </tr>
            <tr>
                <td width="130">twitter<?php echo $this->_tpl_vars['systemLang']['kr']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_twitter_ko" name="twitter_ko" />
                </td>
            </tr>
            <tr>
                <td width="130">twitter<?php echo $this->_tpl_vars['systemLang']['twCn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_twitter_tw" name="twitter_tw" />
                </td>
            </tr>
            <tr>
                <td width="130">facebook<?php echo $this->_tpl_vars['systemLang']['cn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_facebook" name="facebook" />
                </td>
            </tr>
            <tr>
                <td width="130">facebook<?php echo $this->_tpl_vars['systemLang']['en']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_facebook_en" name="facebook_en" />
                </td>
            </tr>
            <tr>
                <td width="130">facebook<?php echo $this->_tpl_vars['systemLang']['jp']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_facebook_jp" name="facebook_jp" />
                </td>
            </tr>
            <tr>
                <td width="130">facebook<?php echo $this->_tpl_vars['systemLang']['kr']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_facebook_ko" name="facebook_ko" />
                </td>
            </tr>
            <tr>
                <td width="130">facebook<?php echo $this->_tpl_vars['systemLang']['twCn']; ?>
</td>
                <td width="*" class="tal">
                    <input type="text" id="lang_facebook_tw" name="facebook_tw" />
                </td>
            </tr>
        </table>
    </form>
</div>


<script>
function getSelectedValue(name){
var obj=document.getElementById(name);
return obj.value;      //直接用其对象的value属性便可获取到
}
function abc(url,a,b){
	ab=getSelectedValue(a);
	bc=getSelectedValue(b);
	window.location=url+'/'+ab+'/'+bc;
}

function showLangTempla(gid){
    $.post('/game_manager/gettpl',{"id" : gid},function(obj){
        for(var i in obj){
            $("#lang_" + i).val(obj[i]).attr("placeholder",'<?php echo $this->_tpl_vars['systemLang']['showJsTpl']; ?>
');
        }
    	placeHolder.init($('#game_invite_template input'));
        $("#game_invite_template").dialog('open');
    },'json');
    return false;
}

$(document).ready(function(){
   // $( "ui-dialog" ).dialog( "destroy" );
    $("#game_invite_template").dialog({
			autoOpen: false,
			height: 300,
			width: 500,
            maxHeight : 400,
            position: 'center',
            resizable: false,
            draggable : false,
            buttons : {
                "保存" : function(){
                    $.post('/game_manager/savetpl',$("#game_invite_template form").serialize(),function(r){
                       alert(r);
                    });
                    $( this ).dialog( "close" );
                },
                "取消" : function(){
                    $( this ).dialog( "close" );
                }
            }
    });
});
</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>